package com.shangxia.monomer.study.math.formula;

/**
 * @author zhouya38158
 * @Package com.shangxia.monomer.study.math
 * @date 2021/7/22 9:10
 */
public class Factorial {
    /**
     * 阶乘
     */
    public static int factorial(int number) {
        int result = 1;
        for (int factor = 2; factor <= number; factor++) {
            result *= factor;
        }
        return result;
    }
}
